﻿using Security;
using System.Web.Mvc;

namespace HomeWeb.Controllers
{
    public class CipherTextController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult ShowText(string message, MessageType type)
        {
            var c = new CipherText();
            var result = type == MessageType.Encrypt ? c.Encrypt(message) : c.Decrypt(message);
            return View((object)result);
        }
    }

    public enum MessageType
    {
        Encrypt,
        Decrypt
    }
}
